<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>研究资源共享平台</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../layui/layui.js"></script>

    <style>
        /*对layui中的样式进行重写*/
        .layui-tab-content {
            padding: 0;/*layui-tab-content:默认有padding: 10px;的值，因为iframe的绝对定位脱离文档流，所以会存在20px的空白空间*/
        }
        .show-frame {
            top: 50px!important;
            /*默认.layui-layout-admin .layui-body {
                top: 60px;
                bottom: 44px;
            }*/
            overflow: hidden;/*消除浏览器最右边的滚动条*/
        }
        .frame {
            position: absolute;
            padding: 10px;/*与layui-
            footer隔开一段距离*/
            width: 100%;
            height: 100%;
        }
    </style>
    <style>
        .ui_upload{
            height: 35px;
            width: 80px;
            background-color: #2be8ee;
            font-size: 14px;
            line-height: 35px;
            cursor: pointer;
            display: inline-block;
            text-align: center;
            color: #fff;
            border-radius: 3px;
            margin-left: 0;
        }


    </style>

</head>
<body>
<div class="layui-layout layui-layout-admin">

    <div th:replace="/common/header :: headerBar"></div>
    <div th:replace="/admuser/lefter :: lefterBar"></div>

    <div class="layui-body show-frame">
        <div class="layui-tab layui-tab-brief" lay-allowClose="true" lay-filter="empTab">
            <ul class="layui-tab-title">
                <li class="layui-this "><i class="layui-icon">管理员</i></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show"><h1 style="color: #5FB878">欢迎进入资源共享系统</h1>
                </div>
            </div>
        </div>
    </div>

    <div th:replace="/common/footer :: footerBar"></div>
</div>
<script src="../layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
        var $ = layui.$;
        $("[name=t1]").click(function () {
            var id = $(this).attr("id");
            var content = $(this).attr("content");
            if($("li[lay-id="+id+"]").length===0){
                element.tabAdd("empTab",{
                    title:$(this).attr("title"),
                    content:"<iframe src='"+content+"' class='frame' frameborder='0'></iframe>",
                    id:id
                })
            }
            element.tabChange('empTab',id)
        })

    });
</script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });

</script>





</body>
</html>
